#!/bin/bash

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python64/2.7.1/lib:/opt/gdal/1.8.0/lib:/opt/proj/4.8.0/lib
export PATH=$PATH:/opt/python64/2.7.1/bin:$HOME/illumina/utils/atlas:/opt/gdal/1.8.0/bin
export PYTHONPATH=/opt/proj/4.8.0/lib/python2.7/site-packages/

export PROJ4STRING="+init=epsg:32618"
for f in `ls -1 PC*.pgm`; do
  echo $f
  lpa_pgm2tif.py $PROJ4STRING -f $f
  echo "Warping..."
  gdalwarp -t_srs "+init=epsg:900913"   ${f/.pgm/.tif}  ${f/.pgm/_epsg900913.tif}
done

